package net.yeah.mickey_zhouyou.util.fcs.elem;

import java.lang.reflect.Field;

import javax.script.ScriptContext;

import net.yeah.mickey_zhouyou.util.fcs.serialize.IConvertor;

public class ObjConstants extends Obj {

	ObjConstants(String value) {
		super.name = value;
	}

	@Override
	public LeftValue asLeftValue(IConvertor objConvertor,
			ScriptContext context, Object upperObj) {
		throw new UnsupportedOperationException();
	}

	@Override
	public Object asRightValue(IConvertor objConvertor, Field field,
			ScriptContext context, Object upperObj) {
		return objConvertor.fromString(super.name, field);
	}
}
